<template>
    <el-dialog 
        :visible.sync="isVisible"
        title="邀请记录" 
        :close-on-click-modal='false'
        :close-on-press-escape='false'
        :modal-append-to-body="false"
        @close="closeDialog">
        <div class="table_container">
          <el-table
              :data="tableData"
              style="width: 100%"
              align='center'
              >
          <el-table-column
              prop="mobile"
              label="手机号"
              align='center'
              width="100">
          </el-table-column>
           <el-table-column
              prop="balance"
              label="余额"
              align='center'
              >
          </el-table-column>
		  <el-table-column
		      prop="invite_code"
		      label="邀请码"
		      align='center'
		      >
		  </el-table-column>
		   <el-table-column
		      prop="invite_num"
		      label="邀请人数"
		      align='center'
		      >
		  </el-table-column>
		  <el-table-column
		      prop="buy_num"
		      label="消费次数"
		      align='center'
		      >
		  </el-table-column>
		   <el-table-column
		      prop="buy_sum"
		      label="消费总金额"
		      align='center'
		      >
		  </el-table-column>
		   <el-table-column
		      prop="prize_num"
		      label="中奖次数"
		      align='center'
		      >
		  </el-table-column>
		  <el-table-column
		      prop="status"
		      label="状态"
		      align='center'
		      >
               <template slot-scope="scope">  
                     {{scope.row.status == 1?'正常':'被拉黑'}}
			    </template>
		  </el-table-column>
          <el-table-column
		      prop="add_time"
		      label="注册时间"
		      align='center'
		      >
            
		  </el-table-column>
		  
		</el-table>
        </div>
    </el-dialog>
</template>

<script>
   import { mapState, mapGetters } from 'vuex'
   import { inviteUserList } from "@/api/user";
   import AreaJson from "@/assets/datas/area.json"

  export default {
      name:'addFundDialogs',
      data(){
          return {
            areaData:[],
            isVisible: this.isShow,
		   tableData: [],
            dialog: {
                width:'680px',
                formLabelWidth:'120px'
            }
          }
      },
      props:{
          isShow:Boolean,
          dialogRow:Object
      },
      mounted(){
          this.getData();
      },
      methods:{
         getData() {
             let param = {
                userId: this.dialogRow.id
             }
             inviteUserList(param).then(res => {
                 this.tableData = res.data.list;
                 console.log(res);
             })
         },
          closeDialog(){
              this.$emit('closeDialog');
          },
          //表单提交
      }
  }
</script>

<style lang="less" scoped>
	.table_container{
	    padding: 10px;
	    background: #fff;
	    border-radius: 2px;
	}
    .search_container{
        margin-bottom: 20px;
    }
    .btnRight{
        float: right;
        margin-right: 0px !important;
    }
    .searchArea{
        background:rgba(255,255,255,1);
        border-radius:2px;
        padding: 18px 18px 0;
    }
</style>
